-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Add GHO, USDS (Sky), and MetaMask USD tokens #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…amed to Stably USD Classic (USDSC) and is no longer supported by the issuer. For more information, please refer to https://stably.io/usdsc
WalkthroughUpdates token metadata (adds multiple network-specific tokens, renames and updates addresses), bumps token-list minor version and timestamp, changes CI deploy step to emit versioned token-list artifacts, and adds a Husky pre-commit hook that runs format/validate/check and stages changes. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer (git commit)
participant Husky as .husky/pre-commit
participant NPM as npm scripts
Dev->>Husky: trigger pre-commit
Husky->>NPM: npm run format
alt format success
Husky->>Husky: git add -A
Husky->>NPM: npm run validate
alt validate success
Husky->>NPM: npm run check
alt check success
Husky-->>Dev: allow commit
else check fail
Husky-->>Dev: abort commit (check failed)
end
else validate fail
Husky-->>Dev: abort commit (validate failed)
end
else format fail
Husky-->>Dev: abort commit (format failed)
end
sequenceDiagram
participant CI as GitHub Actions
participant Script as deploy.yml (Create dist)
participant FS as File system
CI->>Script: run Create dist directory step
Script->>Script: read tokens/token-list.json
Script->>Script: extract VERSION via jq (major/minor/patch)
Script->>FS: write v<major>.<minor>.<patch>.json
Script->>FS: write v<major>.<minor>.json
Script->>FS: write v<major>.json
Script->>FS: write latest.json
Script->>FS: write token-list.json
Script-->>CI: echo created files
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hello @pclaesen, thank you for submitting your first pull request to the request-token-list repository. We value your contribution and encourage you to review our contribution guidelines to ensure your submission meets our standards. Please note that every merged PR is automatically enrolled in our Best PR Initiative, offering a chance to win $500 each quarter. Our team is available via GitHub Discussions or Discord if you have any questions. Welcome aboard! |
|
Thank you for your submission! As you prepare for the review process, please ensure that your PR title, description, and any linked issues fully comply with our contribution guidelines. A clear explanation of your changes and their context will help expedite the review process. Every merged PR is automatically entered into our Best PR Initiative, offering a chance to win $500 every quarter. We appreciate your attention to detail and look forward to reviewing your contribution! |
|
All tests are passing, but there are 2 tokens with the same ID in the list: I don't think the tests should pass, especially not the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tokens/token-list.json (1)
3-8: Version and timestamp not updatedTokens were added/modified; bump the list version (per token-list semver: add = minor, metadata tweak = patch) and refresh the ISO timestamp.
Example:
- "timestamp": "2025-01-09T11:39:10.425Z", + "timestamp": "2025-09-17T00:00:00.000Z", "version": { - "major": 1, - "minor": 0, - "patch": 0 + "major": 1, + "minor": 1, + "patch": 0 },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.husky/_/pre-commit(1 hunks)tokens/token-list.json(5 hunks)
🔇 Additional comments (4)
tokens/token-list.json (4)
4333-4343: GHO mainnet entry: looks correct; please double-check against issuer docsAddress/decimals/network match expectations for GHO; just confirm against the official registry before merge.
5633-5641: USDS (mainnet): confirm issuer and address to avoid symbol collisionsUSDS ticker is ambiguous across ecosystems. Please confirm the issuer and contract at
0xdC035D...384Fin the PR description and commit message.
7799-7808: USDS (Optimism): verify chain address and decimalsValidate the Optimism contract and decimals (18) with issuer docs or chain explorers.
7975-7984: USDS (Arbitrum One): verify chain address and decimalsSame as above; confirm correctness before publishing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tokens/token-list.json(5 hunks)
🔇 Additional comments (6)
tokens/token-list.json (6)
5643-5652: Duplicate-id fix for mUSD verified and approved.Dedupe checks pass with no duplicate IDs or network-address collisions. The "mUSD-metamask-mainnet" ID successfully disambiguates MetaMask USD from mStable's "mUSD-mainnet" entry.
6446-6455: Verification complete: mStable mUSD details confirmed.The contract address 0xe2f2a5C287993345a840Db3B0845fbC70f5935a5 and 18 decimals match Etherscan and mStable documentation for Ethereum mainnet. All token entry values are accurate.
4333-4343: GHO (mainnet) entry verified as correct.The mainnet contract address (0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f) and decimals (18) match the official Aave documentation. The entry is ready to merge.
7799-7808: I need to identify which USDS token this is to verify the details. Let me search for the specific contract address:Let me search more specifically for USDS token projects on Optimism:
Based on my research, I can confirm this is the Sky/USDS token (the evolved form of MakerDAO's DAI). USDS is supported across multiple L2s via SkyLink on Ethereum, Base, Arbitrum, Optimism, Polygon, Avalanche, and Solana, and there is a Maker/Sky-controlled vault for DAI, USDS and sUSDS on Optimism.
However, my web searches did not return specific contract addresses for USDS on individual chains, so I cannot definitively confirm whether
0x4F13a96EC5C4Cf34e442b46Bbd98a0791F20edC3is the official contract address for USDS on Optimism. The decimals value of 18 appears reasonable for this token.Verify the USDS contract address and confirm current L2 deployment scope.
The entry appears structurally sound, but you should directly verify against official Sky documentation or Etherscan that the Optimism address is correct and whether the set of supported L2s (Arbitrum, Base, Polygon, etc.) should also be added to maintain parity across the token list.
5633-5641: Based on my verification, the review comment's concerns are technically valid but require clarification on PR scope. I cannot determine from codebase inspection alone whether this is a NEW change or reviewing existing state post-commit d4ccfd2.Key findings:
Sky/MakerDAO's USDS contract (0xdC035D45d973E3EC169d2276DDab16f1e407384F) with decimals 18 is verified as correct.
USDSC is the canonical symbol for legacy Stably USD Classic.
Critical gap: A prior commit (d4ccfd2, Sept 5) already changed USDS-mainnet to point to Sky, but:
- Version remains 1.0.0 (not bumped for the breaking change)
- No USDSC entry was created despite the commit message stating the legacy token "has been renamed"
No USDSC or "Stably USD Classic" entry currently exists in the token list.
The review comment is valid: If this PR is adding/modifying USDS-mainnet, either bump the major version with migration notes OR add a new id for Sky's USDS while preserving backward compatibility. Additionally, the missing USDSC entry for legacy Stably should be addressed.
Please clarify: Is this PR making NEW changes to USDS-mainnet, or is it addressing the incomplete migration from a prior commit? Also confirm whether USDSC should be added in this PR.
3-8: Review comment addresses wrong token; actual change is to mUSD, not USDS.The git diff shows only one change: the mUSD token id was repointed from
"mUSD-mainnet"to"mUSD-metamask-mainnet". This is a breaking change to the token id. The review comment's guidance about version bumping logic does apply, but to mUSD (requiring a major bump for the breaking id change), not USDS. No USDS tokens were modified in this PR, so the premise of the review comment is incorrect.Likely an incorrect or invalid review comment.
… pre-commit hook - Removed .husky/_/pre-commit (auto-generated internal file that should be gitignored) - Created .husky/pre-commit with proper validation commands - Hook runs: format → validate → check (removed deprecated husky.sh sourcing and git add -A)
- Deploy creates v{MAJOR}.{MINOR}.{PATCH}.json (e.g., v1.1.0.json)
- Deploy creates v{MAJOR}.{MINOR}.json (e.g., v1.1.json)
- Deploy creates v{MAJOR}.json (e.g., v1.json)
- Deploy creates latest.json and token-list.json
- Enables consumers to pin to specific versions for stability
- Version: 1.0.0 → 1.1.0 (minor bump for new token additions) - Timestamp: 2025-01-09 → 2025-11-03 - Aligns with semantic versioning for new features (GHO, USDS, MetaMask USD)
BREAKING CHANGE PREVENTION: - Restored USDS-mainnet (Stably StableUSD at 0xA4Bdb11dc0a2bEC88d24A3aa1E6Bb17201112eBe) to preserve backward compatibility for legacy requests - Renamed new Sky USDS on mainnet to USDS-sky-mainnet to avoid ID collision - L2 tokens (Optimism, Arbitrum) keep original IDs as no conflict exists This prevents breaking existing requests that reference the old USDS-mainnet ID. Token IDs must never be reused as they reference different contracts with different decimals (6 vs 18), which would break amount calculations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
tokens/token-list.json (2)
5633-5641: Reflect issuer rename for legacy Stably USDSPR text says issuer renamed to “Stably USD Classic (USDSC)” and discontinued. Consider updating only the display name to avoid confusion, keeping on-chain symbol “USDS”.
- "name": "StableUSD", + "name": "Stably USD Classic",Optionally add a deprecation note in repo docs since schema lacks a “deprecated” flag. Based on learnings.
3-7: Add validation guardrails to prevent duplicate tokens in validation pipelineVerification confirms the current
tokens/token-list.jsonhas no duplicate ids, duplicate (network,address) pairs, or ids mapping to multiple addresses. However, the historicalmUSD-mainnetincident demonstrates this risk is real. Implementing the provided validation checks innpm run validateis recommended to prevent future occurrences.The validation script correctly checks for:
- Duplicate
idfields- Duplicate
(network,address)pairs (case-insensitive)- Single ids mapped to multiple distinct addresses
Wire the provided script into your validation pipeline.
.github/workflows/deploy.yml (1)
31-51: Harden the versioning step
- Add
set -euto fail fast on jq/cp errors.- Optionally assert
jqpresence for clearer failures.- name: Create dist directory run: | + set -eu mkdir -p dist # Extract version components VERSION=$(jq -r '"\(.version.major).\(.version.minor).\(.version.patch)"' tokens/token-list.json)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/deploy.yml(1 hunks).husky/pre-commit(1 hunks)tokens/token-list.json(7 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: pclaesen
Repo: RequestNetwork/request-token-list PR: 12
File: tokens/token-list.json:7975-7984
Timestamp: 2025-10-25T07:03:42.761Z
Learning: Sky (MakerDAO) USDS and Stably USDS are two different stablecoin tokens with the same "USDS" symbol. On Arbitrum One, Sky USDS is at 0x6491c05A82219b8D1479057361ff1654749b876b, while Stably USDS is at 0x097BF766E427F5CcD306F21Ba05632e0Be849B0E. Sky's USDS is the active MakerDAO stablecoin, while Stably USDS (formerly StableUSD) has been discontinued by its issuer.
📚 Learning: 2025-10-25T07:03:42.761Z
Learnt from: pclaesen
Repo: RequestNetwork/request-token-list PR: 12
File: tokens/token-list.json:7975-7984
Timestamp: 2025-10-25T07:03:42.761Z
Learning: Sky (MakerDAO) USDS and Stably USDS are two different stablecoin tokens with the same "USDS" symbol. On Arbitrum One, Sky USDS is at 0x6491c05A82219b8D1479057361ff1654749b876b, while Stably USDS is at 0x097BF766E427F5CcD306F21Ba05632e0Be849B0E. Sky's USDS is the active MakerDAO stablecoin, while Stably USDS (formerly StableUSD) has been discontinued by its issuer.
Applied to files:
tokens/token-list.json
🔇 Additional comments (7)
tokens/token-list.json (7)
3-3: Timestamp bump looks goodAligned with content changes.
6-6: Minor version bump is appropriateData additions justify 1.1.0.
4333-4343: Add GHO (mainnet): LGTMAddress/decimals/network/chainId consistent.
If desired, confirm against upstream docs for future-proofing.
5643-5663: Add USDS (Sky/MakerDAO) mainnet + mUSD (MetaMask): LGTMDistinct ids avoid the earlier
mUSD-mainnetcollision; fields look consistent.
6458-6466: Clarify mStable entry nameRenaming
mUSD-mainnet’s name to “mStable USD” is clear and avoids branding confusion with MetaMask’s mUSD.
7809-7819: Add USDS on Optimism: LGTMConsistent decimals and chainId 10.
7986-7995: Add USDS on Arbitrum One: LGTMCorrect Sky USDS address used, not Stably’s legacy USDS.
Based on learnings.
…mmit hook - Added 'git add -A' after npm run format to stage formatting changes - Added '|| exit 1' to all commands to ensure hook fails on errors - Prevents formatted changes from being omitted from commits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.husky/pre-commit (1)
4-4: Consider adding error handling for consistency.While
git addrarely fails, adding error handling would make the pattern consistent with the other commands and catch edge cases (disk full, permission issues, etc.).-git add -A +git add -A || exit 1Alternatively, use
set -eat the top of the script to exit on any command failure:#!/usr/bin/env sh +set -e npm run format || exit 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.husky/pre-commit(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: pclaesen
Repo: RequestNetwork/request-token-list PR: 12
File: tokens/token-list.json:7975-7984
Timestamp: 2025-10-25T07:03:42.761Z
Learning: Sky (MakerDAO) USDS and Stably USDS are two different stablecoin tokens with the same "USDS" symbol. On Arbitrum One, Sky USDS is at 0x6491c05A82219b8D1479057361ff1654749b876b, while Stably USDS is at 0x097BF766E427F5CcD306F21Ba05632e0Be849B0E. Sky's USDS is the active MakerDAO stablecoin, while Stably USDS (formerly StableUSD) has been discontinued by its issuer.
📚 Learning: 2025-11-04T02:01:20.548Z
Learnt from: MantisClone
Repo: RequestNetwork/request-token-list PR: 12
File: .husky/_/pre-commit:0-0
Timestamp: 2025-11-04T02:01:20.548Z
Learning: In Husky, the `.husky/_/` directory contains internal implementation details (like the auto-generated `h` helper file) and is typically gitignored. User-facing git hooks should be placed directly in `.husky/` (e.g., `.husky/pre-commit`), not in `.husky/_/`. Files in `.husky/_/` are auto-generated by Husky during `npm install`.
Applied to files:
.husky/pre-commit
🔇 Additional comments (1)
.husky/pre-commit (1)
3-4: Verify that staging all changes is intentional.The
git add -Aon line 4 addresses the previous reviewer's concern about staging formatted changes. However, this command stages all changes in the repository—including any unrelated unstaged files—not just files modified by the formatter. This could inadvertently commit changes the developer intended to keep separate.Consider one of these alternatives if the broad staging is unintended:
Option 1: Stage only tracked files that were modified (excludes new untracked files):
-git add -A +git add -uOption 2: Stage only files the formatter actually touched (requires capturing formatter output or using git diff):
-git add -A +git diff --name-only | xargs git addIf staging all changes is intentional (to ensure a clean working tree), consider documenting this behavior in the repository's contributing guidelines.
Based on learnings
|
Congratulations, your pull request has been merged! Thank you for your valuable contribution to Request Network. As a reminder, every merged PR is automatically entered into our Best PR Initiative, offering a quarterly prize of $500. Your work significantly supports our project's growth, and we encourage you to continue engaging with our community. Additionally, if you want to build or add crypto payments and invoicing features, explore how our API can reduce deployment time from months to hours while offering advanced features. Book a call with our expert to learn more and fast-track your development. |
Problem
Token list is missing several major stablecoins: Aave's GHO, Sky's USDS (on mainnet and L2s), and MetaMask USD. Additionally, the old Stably USDS token (deprecated and renamed to USDSC) was still listed.
Proposed Solution
USDS-mainnetfor backward compatibilityUSDS-sky-mainnetID for new Sky USDS on mainnet to avoid ID collisionConsiderations
USDS-mainnetID preserved to prevent breaking existing requests that reference Stably's token (different contract address + decimals would break amount calculations)Original contributor description (@pclaesen):
Maintainer commits: